﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;

namespace Interview_Prov.Private.User
{
    public partial class SelectInterview : System.Web.UI.Page
    {
        public string ReturnUrl { get; set; }
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Select_Interview_Ctl1.OkButtonClicked += new EventHandler(Select_Interview_Ctl1_OkButtonClicked);

            StringBuilder sb = new StringBuilder();

            if (Request.QueryString["ReturnUrl"] != null)
            {
                ReturnUrl = (string)Request.QueryString["ReturnUrl"];
            }
            else
            {
                ReturnUrl = "~\\Default.aspx";
            }

        }

        void Select_Interview_Ctl1_OkButtonClicked(object sender, EventArgs e)
        {
            if (!ReturnUrl.Contains('?'))
            {
                ReturnUrl += "?";
            }
            else
            {
                ReturnUrl += "&";
            }
            var url=string.Format("{0}InterviewID={1}", this.ReturnUrl, Select_Interview_Ctl1.SelectedInterviewID);
            Response.Redirect(url, true);
        }
    }
}